﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration.Provider;
using System.Collections.Specialized;

namespace PictureManager.Core.Provider
{
    public abstract class PictureProvider : ProviderBase
    {
        #region Settings
        /// <summary>
        /// Gets the storage location.
        /// </summary>
        /// <returns>The storage location.</returns>
        public abstract string StorageLocation();
        /// <summary>
        /// Loads the settings from the provider.
        /// </summary>
        /// <returns>A StringDictionary.</returns>
        public abstract StringDictionary LoadSettings();
        /// <summary>
        /// Saves the settings to the provider.
        /// </summary>
        /// <param name="settings">
        /// The settings.
        /// </param>
        public abstract void SaveSettings(StringDictionary settings);
        public abstract string PictureRootNode();
        public abstract string BackupLocation();
        #endregion

        #region Picture
        /// <summary>
        /// Inserts a new <see cref="PictureItem"/> into the data store specified by the provider.
        /// </summary>
        /// <param name="item">
        /// The picture Item to insert.
        /// </param>
        public abstract void InsertPictureItem(PictureItem item);
        /// <summary>
        /// Deletes a <see cref="PictureItem"/> from the data store specified by the provider.
        /// </summary>
        /// <param name="item">
        /// The <see cref="PictureItem"/> to delete.
        /// </param>
        public abstract void DeletePictureItem(PictureItem item);
        /// <summary>
        /// Updates an existing <see cref="PictureItem"/> in the data store specified by the provider.
        /// </summary>
        /// <param name="item">
        /// The <see cref="PictureItem"/> to update.
        /// </param>
        public abstract void UpdatePictureItem(PictureItem item);
        /// <summary>
        /// Retrieves all picture items from the provider and returns them in a list.
        /// </summary>
        /// <returns>A list of <see cref="PictureItem"/>.</returns>
        public abstract List<PictureItem> GetPictures();
        /// <summary>
        /// Gets a <see cref="PictureItem"/> based on a id.
        /// </summary>
        /// <param name="id">
        /// The <see cref="PictureItem"/>'s id.
        /// </param>
        /// <returns>
        /// A matching <see cref="PictureItem"/>
        /// </returns>
        public abstract PictureItem GetPictureItem(String id);
        /// <summary>
        /// Save all <see cref="PictureItem"/> Item at once.
        /// </summary>
        public abstract void SavePictureList();
        #endregion
    }
}
